home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / MUSIC1.PAK / VIEW.MNU < prev    next >
Encoding:
Text File  |  1995-07-18  |  9.7 KB  |  326 lines

  1. *******************************************************************************
  2. *  PROGRAM:      View.mnu
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      5/95
  9. *
  10. *  REVISION:     $Revision:   1.34  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This is a menu file used by all view forms in the Musical
  15. *                Methods application.  It allows seeing information in different
  16. *                orders (depending on which view you are running), setting
  17. *                filters, searching, printing reports, and bringing up as many
  18. *                possible views as you like.  All these views are kept track of
  19. *                in the Windows menu.
  20. *
  21. *  PARAMETERS:   F  (parent form)
  22. *
  23. *  CALLS:        None
  24. *
  25. *  USAGE:        F.MenuFile = "View.mnu"
  26. *
  27. *******************************************************************************
  28. #include "Music.h"
  29. #include <Messdlg.h>
  30.  
  31. ** END HEADER -- do not remove this line*
  32. * Generated on 05/22/95
  33. *
  34. Parameter FormObj
  35. NEW VIEWMENU(FormObj,"Root")
  36. CLASS VIEWMENU(FormObj,Name) OF MENUBAR(FormObj,Name)
  37.  
  38.  
  39.    DEFINE MENU FILE OF THIS;
  40.        PROPERTY;
  41.          Text "&File"
  42.  
  43.          DEFINE MENU EXIT OF THIS.FILE;
  44.              PROPERTY;
  45.                Shortcut "CTRL-Q",;
  46.                Text "E&xit",;
  47.                OnClick CLASS::EXITMUSIC
  48.  
  49.    DEFINE MENU VIEW OF THIS;
  50.        PROPERTY;
  51.          Text "&View"
  52.  
  53.          DEFINE MENU MUSIC OF THIS.VIEW;
  54.              PROPERTY;
  55.                StatusMessage "Display available musical items.",;
  56.                Text "&Music",;
  57.                OnClick {;do MusiView.wfm},;
  58.                Enabled .F.
  59.  
  60.          DEFINE MENU CATEGORIES OF THIS.VIEW;
  61.              PROPERTY;
  62.                StatusMessage "Display the musical categories available.",;
  63.                Text "&Categories",;
  64.                OnClick {;do Categors.wfm},;
  65.                Enabled .F.
  66.  
  67.          DEFINE MENU RANKINGS OF THIS.VIEW;
  68.              PROPERTY;
  69.                StatusMessage "Display the sales rankings of the current musical items.",;
  70.                Text "&Rankings",;
  71.                OnClick {;do Priorits.wfm},;
  72.                Enabled .F.
  73.  
  74.          DEFINE MENU MEDIA_TYPES OF THIS.VIEW;
  75.              PROPERTY;
  76.                StatusMessage "Display the media types available.",;
  77.                Text "M&edia Types",;
  78.                OnClick {;do Configs.wfm},;
  79.                Enabled .F.
  80.  
  81.          DEFINE MENU SEPARATEVIEWS OF THIS.VIEW;
  82.              PROPERTY;
  83.                Separator .T.
  84.  
  85.          DEFINE MENU ORGANIZATION OF THIS.VIEW;
  86.              PROPERTY;
  87.                StatusMessage "Change viewing order of displayed information.",;
  88.                Text "&Organization"
  89.  
  90.                DEFINE MENU RANK OF THIS.VIEW.ORGANIZATION;
  91.                    PROPERTY;
  92.                      StatusMessage "Order items by Rank.",;
  93.                      Text "&Rank",;
  94.                      OnClick CLASS::RANK_ONCLICK,;
  95.                      Checked .T.
  96.  
  97.                DEFINE MENU ARTIST OF THIS.VIEW.ORGANIZATION;
  98.                    PROPERTY;
  99.                      StatusMessage "Order items by Artist.",;
  100.                      Text "&Artist",;
  101.                      OnClick CLASS::ARTISTS_ONCLICK
  102.  
  103.                DEFINE MENU TITLE OF THIS.VIEW.ORGANIZATION;
  104.                    PROPERTY;
  105.                      StatusMessage "Order items by Title",;
  106.                      Text "&Title",;
  107.                      OnClick CLASS::TITLES_ONCLICK
  108.  
  109.          DEFINE MENU SEPARATEVIEWS2 OF THIS.VIEW;
  110.              PROPERTY;
  111.                Text "Separateviews2",;
  112.                Separator .T.
  113.  
  114.          DEFINE MENU BROWSE OF THIS.VIEW;
  115.              PROPERTY;
  116.                StatusMessage "View the items in Browse mode.",;
  117.                Text "&Browse",;
  118.                OnClick CLASS::BROWSE_ONCLICK
  119.  
  120.          DEFINE MENU FILTER OF THIS.VIEW;
  121.              PROPERTY;
  122.                StatusMessage "Select a group of items to view.",;
  123.                Text "&Filter",;
  124.                OnClick CLASS::FILTER_ONCLICK
  125.  
  126.    DEFINE MENU SEARCH OF THIS;
  127.        PROPERTY;
  128.          Text "&Search"
  129.  
  130.          DEFINE MENU SEARCH_FOR OF THIS.SEARCH;
  131.              PROPERTY;
  132.                Shortcut "CTRL-S",;
  133.                Text "&Search for...",;
  134.                OnClick CLASS::SEARCH_ONCLICK
  135.  
  136.          DEFINE MENU SKIP OF THIS.SEARCH;
  137.              PROPERTY;
  138.                Shortcut "CTRL-K",;
  139.                Text "S&kip...",;
  140.                OnClick CLASS::SKIP_ONCLICK
  141.  
  142.    DEFINE MENU OPTIONS OF THIS;
  143.        PROPERTY;
  144.          Text "&Options"
  145.  
  146.          DEFINE MENU REPORT__TOP_TEN_ARTISTS OF THIS.OPTIONS;
  147.              PROPERTY;
  148.                StatusMessage "View report of top ten artists.",;
  149.                Text "&Report -- Top Ten Artists",;
  150.                OnClick CLASS::REPORT
  151.  
  152.    DEFINE MENU WINDOWS OF THIS;
  153.        PROPERTY;
  154.          Text "&Windows"
  155.  
  156.    DEFINE MENU HELP OF THIS;
  157.        PROPERTY;
  158.          Text "Help"
  159.  
  160.          DEFINE MENU CONTENTS OF THIS.HELP;
  161.              PROPERTY;
  162.                Text "&Contents",;
  163.                OnClick {;help},;
  164.                HelpFile "Music.hlp"
  165.  
  166.          DEFINE MENU SEARCH OF THIS.HELP;
  167.              PROPERTY;
  168.                HelpId " ",;
  169.                Text "&Search...",;
  170.                OnClick CLASS::SEARCHHELP,;
  171.                HelpFile "Music.hlp"
  172.  
  173.          DEFINE MENU ABOUT OF THIS.HELP;
  174.              PROPERTY;
  175.                Text "&About...",;
  176.                OnClick CLASS::ABOUT
  177.  
  178.  
  179.    procedure ExitMusic
  180.  
  181.    * This is the last procedure to be executed before the program completes.
  182.    *******************************************************************************
  183.  
  184.  
  185.    if _app.framewin.text = MUSIC_APP_TITLE      && If whole application running
  186.       trackWindows.RestoreEnvironment()         && Must restore env before all
  187.                                                 && windows close -- otherwise
  188.                                                 && will leave session
  189.       trackWindows.DeleteAllWindows()           && Close and release all winds
  190.       release trackWindows                      && Release public variable
  191.       close procedure Music.prg
  192.    else
  193.       form.Release()
  194.    endif
  195.  
  196.  
  197.  
  198.    *******************************************************************************
  199.  
  200.    procedure Rank_OnClick
  201.  
  202.    * Display form in Rank order
  203.    *******************************************************************************
  204.  
  205.    CallShowRankView(form)           && Procedure in Music.prg
  206.  
  207.  
  208.    *******************************************************************************
  209.  
  210.    procedure Artists_OnClick
  211.  
  212.    * Display form in Artists Order
  213.    *******************************************************************************
  214.  
  215.    CallShowArtistsView(form)        && Procedure in Music.prg
  216.  
  217.  
  218.    *******************************************************************************
  219.  
  220.    procedure Titles_OnClick
  221.  
  222.    * Display form in Titles  Order
  223.    *******************************************************************************
  224.  
  225.    CallShowTitlesView(form)         && Procedure in Music.prg
  226.  
  227.  
  228.    *******************************************************************************
  229.  
  230.    procedure Browse_OnClick
  231.  
  232.    * Display form in Browse format
  233.    *******************************************************************************
  234.  
  235.    BrowseEdit(form)                 && Procedure in Music.prg
  236.  
  237.  
  238.    *******************************************************************************
  239.  
  240.    procedure Filter_OnClick
  241.  
  242.    * Set up filter form
  243.    *******************************************************************************
  244.  
  245.    FilterView(form)                     && Procedure in Music.prg
  246.  
  247.  
  248.    *******************************************************************************
  249.  
  250.    procedure Search_OnClick
  251.  
  252.    * Search for an item.  Brings up a dialog for specifying an item to searh for.
  253.    *******************************************************************************
  254.  
  255.    SearchItems(form)                    && Procedure in Music.prg
  256.  
  257.  
  258.    *******************************************************************************
  259.  
  260.    procedure Skip_OnClick
  261.  
  262.    * Skip to a specified record.  Brings up a dialog for specifying how far
  263.    * to skip.
  264.    *******************************************************************************
  265.  
  266.    SkipItems(form)                      && Procedure in Music.prg
  267.  
  268.  
  269.    *******************************************************************************
  270.  
  271.    procedure Report
  272.  
  273.    * Displays Crystal report of top 10 artists.
  274.    *******************************************************************************
  275.  
  276.    create session
  277.    set lock off
  278.    report form Top10Ar          && Top 10 Artists
  279.  
  280.  
  281.  
  282.  
  283.    *******************************************************************************
  284.  
  285.    procedure SearchHelp
  286.  
  287.    * Brings up Help in "Search" mode
  288.    *******************************************************************************
  289.    private x
  290.  
  291.    x = " "
  292.    help &x
  293.  
  294.  
  295.    *******************************************************************************
  296.  
  297.    procedure About
  298.  
  299.    * Brings up "About" dialog, which displays information about this app.
  300.    *******************************************************************************
  301.    do About.wfm with .T.        && Open form modally
  302.  
  303.  
  304.  
  305.  
  306.  
  307.    ************************* Utility Procedures **********************************
  308.  
  309.    *******************************************************************************
  310.  
  311.    Procedure AssignWindowMenu
  312.  
  313.    * Make the Windows menu item of this menu display all active windows, with
  314.    * the current one in focus checked.
  315.    *******************************************************************************
  316.  
  317.    this.windowMenu = this.Windows
  318.  
  319.  
  320.  
  321. ENDCLASS
  322.  
  323.  
  324.  
  325.  
  326.